<?php
include 'base.php';
// $username ='123456';
// $password = '12345';
$username = $_POST['username'];
$password = $_POST['password'];
$sql = "SELECT * FROM `user` WHERE `username` = '$username' AND `password` = '$password'";
$res = $conn->query($sql);
if($row = mysqli_fetch_assoc($res)){
  echo '该账号已注册';
}else{
  $sql = "INSERT INTO `user` VALUES ('$username','$password')";
  $res = $conn->query($sql);
  // echo '注册成功';
}
